import type { ComputedRef, Ref } from 'vue';

export type UnReadonly<T> = {
  -readonly [P in keyof T]: T[P];
};
export type MakeRequired<T, K extends keyof T> = Required<Pick<T, K>> & Omit<T, K>;

export interface Fn<T = any, R = T> {
  (...arg: T[]): R;
}

export type DynamicProps<T> = {
  [P in keyof T]: Ref<T[P]> | T[P] | ComputedRef<T[P]>;
};

export type Recordable<T = any> = Record<string, T>;

/**
 * T | null 包装
 */
export type Nullable<T> = T | null;